package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author yeqiang
 * @since 2021/5/26 下午1:52
 */
@RestController
public class RedirectController {
    @RequestMapping("redirect")
    void redirect(HttpServletResponse response) throws IOException {
        response.sendRedirect("/ip");
    }
}
